def repeat(n):
      # 传入greet函数
      def decorator(func):
            def wrapper(*args,**kwargs):
                  for _ in range(n):
                        # 调用greet函数
                        result = func(*args,**kwargs)
                  return result
            return wrapper
      return decorator

@repeat(3)
def greet(name):
      print(f"Hello,{name}")

greet("Alice")